package a66weding.com.jiehuntong.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.List;

import a66weding.com.jiehuntong.R;

/**
 * Created by admin on 2016/7/5.
 */
public class MyProAdapter extends MyBaseAdapter{

    public MyProAdapter(Context context, List data) {
        super(context, data);
    }
    @Override
    public View getView(int position, View convertView, ViewGroup viewGroup) {
        ViewHolder holder;
        if(convertView==null){
            convertView = View.inflate(context, R.layout.diy_item_progress,null);
            holder = new ViewHolder();
            holder.iv_touxiang = (ImageView) convertView.findViewById(R.id.progress_item_iv_touxiang);
            holder.tv_name = (TextView) convertView.findViewById(R.id.progress_item_tv_name);
            holder.tv_date = (TextView) convertView.findViewById(R.id.progress_item_tv_date);
            holder.tv_stutas = (TextView) convertView.findViewById(R.id.progress_item_tv_stutas);
            holder.tv_place = (TextView) convertView.findViewById(R.id.progress_item_tv_place);
            // 为view设置标签
            convertView.setTag(holder);
        }else{
            holder = (ViewHolder) convertView.getTag();
        }
        return convertView;
    }

    public static class ViewHolder {
        public TextView tv_name, tv_date, tv_stutas, tv_place;
        public ImageView iv_touxiang;
    }
}
